Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vendor sherlodoc #1259

Closed
wants to merge 294 commits into from
Closed

Vendor sherlodoc #1259

wants to merge 294 commits into from

Conversation

Julow
Copy link
Collaborator

@Julow Julow commented Dec 11, 2024

This vendors sherlodoc to simplify maintaining compatibility using a Git subtree. This is not a complicated concept, sherlodoc's code is simply copied into odoc's source tree and can be modified normally.

The commits made by the subtree command also point to sherlodoc's history. This allows to easily pull changes made to sherlodoc or to easily upstream change made in the vendored copy. Here are the commands I used to pull some unmerged PRs on sherlodoc:

This system might not work for ever and conflicts might be too hard to resolve for git subtree's algorithm. That's not a problem as this has no cost to begin with.

The last commit makes sherlodoc be part of the odoc-driver package.

art-w and others added 26 commits February 2, 2024 10:44
tests link in docstrings

Co-authored-by: Emile Trotignon <[email protected]>
The path relative to the project root makes sherlodoc impossible to
vendor. Use a relative path instead.
"Fewer conversions between Names and strings"
"Overhaul of module-type-of and shadowing"
"Remove core types and exceptions from identifiers"
Several changes:
- Entries are now defined in the `odoc_index` library,
- Entries can have new kinds (pages, source, ...)
- Indexes have the form of "skeletons of entries", that can be folded.
- Indexes can be created by odoc with the `odoc compile-index` command, and
  then consumed by sherlodoc.

These changes come from:
- ocaml#1228
- ocaml#1232
- ocaml#1233
- ocaml#1244
- ocaml#1250
- ocaml#1251
This function was used only in sherlodoc, it makes sense to be here.
In particular, odoc 3 fixed a bug where "hidden" modules were still
indexed. This is why e.g. `Base.StringLabels` is removed from the tests
output.
Odoc 3 also fixed the way extension constructor are handled.

Before, a "type" would be added, with ID the first constructor, making things
rather strange from the user eg as in the (now fixed) example:
```
type Main.MyExtension
```
displayed for
```
type extensible_type += MyExtension
```

This is now fixed. A test for the definition of the extensible type is also
added.
…65bbdeab'

git-subtree-dir: vendor/sherlodoc
git-subtree-mainline: 7fa3d8b
git-subtree-split: 77ecc82
@@ -23,3 +23,5 @@
(progn
(bash "diff doc/driver.mld doc/driver.mld.corrected >&2 || true")
(cat doc/driver-benchmarks.json))))

(vendored_dirs vendor)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to consider sherlodoc as vendored: we want the tests to be run, the warnings to be displayed, ...

@Julow Julow mentioned this pull request Dec 13, 2024
@Julow
Copy link
Collaborator Author

Julow commented Dec 13, 2024

Closed in favor of #1263

@Julow Julow closed this Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants